package com.pet.platform.mapper;

import com.pet.platform.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface UserMapper {
    User findById(@Param("id") Long id);
    
    User findByUsername(@Param("username") String username);
    
    List<User> findList(Map<String, Object> params);
    
    Long count(Map<String, Object> params);
    
    void insert(User user);
    
    void update(User user);
    
    void delete(@Param("id") Long id);

    /**
     * 获取用户总数
     */
    Long count();
} 